package main

import (
	"VideoServer/scheduler/taskRunner"
	"github.com/julienschmidt/httprouter"
	"log"
	"net/http"
)

func RegisterHandlers() *httprouter.Router {
	r := httprouter.New()
	r.GET("/video-delete-record/:vid-id", videoDelHandler)
	return r
}

func main() {
	/*比较优雅的block方式:
	planA:c := make(chan int)
	<- c
	planB:for{}*/
	go taskRunner.Start()
	r := RegisterHandlers()
	log.Println("删除日志服务在9001端口启动了.")
	http.ListenAndServe(":9001", r)
}
